<?php
/**
 * Created by PhpStorm.
 * User: hedonglin
 * Date: 2017/10/27
 * Time: 9:00
 */

namespace app\admin\model;

use DateTime;
use think\Model;
use think\Session;

class Etask extends Model
{
    protected $insert = ['create_data','createuser_id'];
    protected $update = ['createuser_id'];

    protected function setCreateDataAttr()
    {
        return Date('Y-m-d H:i:s');
    }
    protected function setCreateuserIdAttr()
    {
        //从session中获取当前用户id
        return Session::get("userInfo.id");
    }

}